package com.gnuc.thoth.app;

import android.content.SharedPreferences;
import android.os.Bundle;
import android.preference.PreferenceActivity;
import android.preference.PreferenceManager;

import com.gnuc.thoth.R;
import com.gnuc.thoth.framework.Thoth;

public class PreferencesMain extends PreferenceActivity
{
	@Override
	public void onStart()
	{
		super.onStart();
		Thoth.Settings.read();
		SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getBaseContext());
		/*
		 * Thoth.Settings.APP_LOG_CALL_IN_PROGRESS = prefs.getBoolean("APP_LOG_CALL",
		 * Thoth.Settings.APP_LOG_CALL_IN_PROGRESS); Thoth.Settings.APP_LOG_MSGS_IN_PROGRESS =
		 * prefs.getBoolean("APP_LOG_MSGS", Thoth.Settings.APP_LOG_MSGS_IN_PROGRESS);
		 * Thoth.Settings.APP_LOG_MSGM_IN_PROGRESS = prefs.getBoolean("APP_LOG_MSGM",
		 * Thoth.Settings.APP_LOG_MSGM_IN_PROGRESS); Thoth.Settings.APP_LOG_DATA_IN_PROGRESS =
		 * prefs.getBoolean("APP_LOG_DATA", Thoth.Settings.APP_LOG_DATA_IN_PROGRESS);
		 */
		Thoth.Settings.APP_ENABLE_GoMAIL = prefs.getBoolean("ENABLE_GoMAIL", Thoth.Settings.APP_ENABLE_GoMAIL);
		Thoth.Settings.APP_ENABLE_GoCAL = prefs.getBoolean("ENABLE_GoCAL", Thoth.Settings.APP_ENABLE_GoCAL);
	}
	
	@Override
	public void onCreate(Bundle savedInstanceState)
	{
		super.onCreate(savedInstanceState);
		addPreferencesFromResource(R.xml.thoth_preferences);
	}
}
